package com.hpjz.common.data;

import java.util.List;

/**
 * 分页查询
 * 
 * @author bbchen
 *
 */
public class PageData {
	private int pageSize = 10;
    private int currentPage;
    private int totalCount;
    private int offIndex;
    private List data;
    
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		if (currentPage<1) {
			this.currentPage=1;
		}else{
			this.currentPage = currentPage;
		}
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	
	
	public int getOffIndex() {
		this.offIndex = (getCurrentPage()-1)*this.getPageSize();
		return offIndex;
	}
	public void setOffIndex(int offIndex) {
		
		this.offIndex = offIndex;
	}
	public List getData() {
		return data;
	}
	public void setData(List data) {
		this.data = data;
	}
    
    
}
